package withdraw

import (
	"context"

	"gitee.com/spume/common_service/app/billing/api/withdraw/v1"
	"gitee.com/spume/common_service/app/billing/internal/service"
)

func (c *ControllerV1) WithdrawList(ctx context.Context, req *v1.WithdrawListReq) (res *v1.WithdrawListRes, err error) {
	res = &v1.WithdrawListRes{}

	req.Wheres.Set("memberId", req.MemberId)
	req.Wheres.Set("tenantId", req.TenantId)
	req.Wheres.Set("currencyType", req.CurrencyType)
	req.Wheres.Set("status", req.Status)

	res.PageLstRes, err = service.WithdrawDetail().Lst(ctx, req.PageLstReq)
	return
}
